using UnityEngine;
using System.Collections;

public class startScreenHud : MonoBehaviour {
	public Texture2D bg;
	public Texture2D button;
	public MovieTexture introMovie;
	bool playVideo= false;
	public GUISkin mySkin;
	// Use this for initialization
	void OnGUI() {
		GUI.skin= mySkin;
		if (!playVideo) {
			GUI.Label(new Rect(0,0,Screen.width, Screen.height), bg);
			if (GUI.Button(new Rect(Screen.width*.5f, Screen.height*.5f, Screen.width*.5f, Screen.height*.25f), "")) {
				playVideo= true;	
				introMovie.Play();
			}
		}
		else {
			GUI.Label(new Rect(0,0,Screen.width, Screen.height), introMovie);
			if (GUI.Button(new Rect(Screen.width-Screen.width*.25f, Screen.height-Screen.height*.1f,Screen.width*.25f, Screen.height*.1f), "Skip", "label")) {
					Application.LoadLevel("Scene1");
			}
			if (!introMovie.isPlaying) Application.LoadLevel("Scene1");
		}
	}
}
